﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ServerSideViewStateImplementation.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="btnSubmit" runat="server" Text="Click Me" 
            onclick="btnSubmit_Click" />
        <br />
        <asp:Label ID="lblMessaje" runat="server" Text=""></asp:Label>
    </div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ProductID" DataSourceID="EntityDataSource1" 
        EmptyDataText="There are no data records to display.">
        <Columns>
            <asp:BoundField DataField="ProductID" HeaderText="ProductID" ReadOnly="True" 
                SortExpression="ProductID" />
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="ProductNumber" HeaderText="ProductNumber" 
                SortExpression="ProductNumber" />
            <asp:BoundField DataField="Color" HeaderText="Color" SortExpression="Color" />
            <asp:BoundField DataField="StandardCost" HeaderText="StandardCost" 
                SortExpression="StandardCost" />
            <asp:BoundField DataField="ListPrice" HeaderText="ListPrice" 
                SortExpression="ListPrice" />
            <asp:BoundField DataField="Size" HeaderText="Size" SortExpression="Size" />
            <asp:BoundField DataField="Weight" HeaderText="Weight" 
                SortExpression="Weight" />
            <asp:BoundField DataField="ProductCategoryID" HeaderText="ProductCategoryID" 
                SortExpression="ProductCategoryID" />
            <asp:BoundField DataField="ProductModelID" HeaderText="ProductModelID" 
                SortExpression="ProductModelID" />
            <asp:BoundField DataField="SellStartDate" HeaderText="SellStartDate" 
                SortExpression="SellStartDate" />
            <asp:BoundField DataField="SellEndDate" HeaderText="SellEndDate" 
                SortExpression="SellEndDate" />
            <asp:BoundField DataField="DiscontinuedDate" HeaderText="DiscontinuedDate" 
                SortExpression="DiscontinuedDate" />
            <asp:BoundField DataField="ThumbnailPhotoFileName" 
                HeaderText="ThumbnailPhotoFileName" SortExpression="ThumbnailPhotoFileName" />
            <asp:BoundField DataField="rowguid" HeaderText="rowguid" 
                SortExpression="rowguid" />
            <asp:BoundField DataField="ModifiedDate" HeaderText="ModifiedDate" 
                SortExpression="ModifiedDate" />
        </Columns>
    </asp:GridView>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=AdventureWorksLTEntities" 
        DefaultContainerName="AdventureWorksLTEntities" EnableFlattening="False" 
        EntitySetName="Product">
    </asp:EntityDataSource>
    </form>
</body>
</html>
